package br.com.simora.manager;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.inject.Inject;
import javax.inject.Singleton;

import org.apache.log4j.Logger;

import br.com.simora.crawler.ATardeFMCrawler;
import br.com.simora.crawler.AlphaFMCrawler;
import br.com.simora.crawler.AlvoradaFMCrawler;
import br.com.simora.crawler.Antena102FMCrawler;
import br.com.simora.crawler.Antena1BHFMCrawler;
import br.com.simora.crawler.AtlantidaRSFMCrawler;
import br.com.simora.crawler.AtlantidaSCFMCrawler;
import br.com.simora.crawler.Beat98FMCrawler;
import br.com.simora.crawler.CidadeFortalezaFMCrawler;
import br.com.simora.crawler.ContinentalFMCrawler;
import br.com.simora.crawler.DimensaoFMCrawler;
import br.com.simora.crawler.DisneyFMCrawler;
import br.com.simora.crawler.Energia97FMCrawler;
import br.com.simora.crawler.GloboFMCrawler;
import br.com.simora.crawler.Goiania995FMCrawler;
import br.com.simora.crawler.InterativaFMCrawler;
import br.com.simora.crawler.ItapemaRSFMCrawler;
import br.com.simora.crawler.ItapemaSCFMCrawler;
import br.com.simora.crawler.JBFMCrawler;
import br.com.simora.crawler.LembrancaFlashbackFMCrawler;
import br.com.simora.crawler.LiderancaFMCrawler;
import br.com.simora.crawler.LiteFMCrawler;
import br.com.simora.crawler.LitoralFMCrawler;
import br.com.simora.crawler.LumenFMCrawler;
import br.com.simora.crawler.ManiaGoianiaFMCrawler;
import br.com.simora.crawler.ManiaJuizDeForaFMCrawler;
import br.com.simora.crawler.ManiaRioFMCrawler;
import br.com.simora.crawler.ManiaUberlandiaFMCrawler;
import br.com.simora.crawler.ManiaVoltaRedondaFMCrawler;
import br.com.simora.crawler.MetropolitanaFMCrawler;
import br.com.simora.crawler.MixFM;
import br.com.simora.crawler.MundoLivreFMCrawler;
import br.com.simora.crawler.NativaBHFMCrawler;
import br.com.simora.crawler.NativaFM;
import br.com.simora.crawler.PositivaFMCrawler;
import br.com.simora.crawler.Radio100FortalezaFMCrawler;
import br.com.simora.crawler.Radio96FMCrawler;
import br.com.simora.crawler.RadioCidadeFMCrawler;
import br.com.simora.crawler.RadioCidadeRSFMCrawler;
import br.com.simora.crawler.RadioRock89FMCrawler;
import br.com.simora.crawler.RadioTempoFMCrawler;
import br.com.simora.crawler.SulamericaParadisoFMCrawler;

@Singleton
public class Manager {
	private static Logger logger = Logger.getLogger(Manager.class);
	@Inject private GloboFMCrawler globofm;
	@Inject private JBFMCrawler jbfm;
	@Inject private RadioCidadeFMCrawler cidadefm;
	@Inject private LiteFMCrawler litefm;
	@Inject private MixFM mixfm;
	@Inject private MetropolitanaFMCrawler metropolitanafm;
	@Inject private Beat98FMCrawler beat98fm;
	@Inject private NativaFM nativafm;
	@Inject private SulamericaParadisoFMCrawler sulamericaparadisofm;
	@Inject private RadioRock89FMCrawler radiorock89fm;
	@Inject private ATardeFMCrawler atardefm;
	@Inject private LitoralFMCrawler litoralfm;
	@Inject private DisneyFMCrawler disneyfm;
	@Inject private AlphaFMCrawler alphafm;
	@Inject private MundoLivreFMCrawler mundolivrefm;
	@Inject private AtlantidaRSFMCrawler atlantidarsfm;
	@Inject private RadioCidadeRSFMCrawler radiocidadersfm;
	@Inject private ContinentalFMCrawler continentalfm;
	@Inject private ItapemaRSFMCrawler itapemarsfm;
	@Inject private LembrancaFlashbackFMCrawler lembrancaflashbackfm;
	@Inject private AlvoradaFMCrawler alvoradafm;
	@Inject private Goiania995FMCrawler goiania995fm;
	@Inject private PositivaFMCrawler positivafm;
	@Inject private InterativaFMCrawler interativafm;
	@Inject private ItapemaSCFMCrawler itapemascfm;
	@Inject private AtlantidaSCFMCrawler atlantidascfm;
	@Inject private LiderancaFMCrawler liderancafm;
	@Inject private CidadeFortalezaFMCrawler cidadefortalezafm;
	@Inject private Radio100FortalezaFMCrawler radio100fortalezafm;
	@Inject private RadioTempoFMCrawler radiotempofm;
	@Inject private Radio96FMCrawler radio96fm;
	@Inject private Antena1BHFMCrawler antena1bhfm;
	@Inject private NativaBHFMCrawler nativabhfm;
	@Inject private Antena102FMCrawler antena102fm;
	@Inject private LumenFMCrawler lumenfm;
	@Inject private ManiaRioFMCrawler maniariofm;
	@Inject private ManiaVoltaRedondaFMCrawler maniavoltaredondafm;
	@Inject private ManiaJuizDeForaFMCrawler maniajuizdeforafm;
	@Inject private ManiaUberlandiaFMCrawler maniauberlandiafm;
	@Inject private ManiaGoianiaFMCrawler maniagoianiafm;
	@Inject private DimensaoFMCrawler dimensaofm;
	@Inject private Energia97FMCrawler energia97fm;
	
	
	public void iniciaThreads(){
		ExecutorService executorService = Executors.newFixedThreadPool(100);
		try {
			executorService.submit(globofm);
			Thread.sleep(600);
			executorService.submit(jbfm);
			Thread.sleep(600);
			executorService.submit(cidadefm);
			Thread.sleep(600);
			executorService.submit(litefm);
			Thread.sleep(600);
			executorService.submit(mixfm);
			Thread.sleep(600);
			executorService.submit(metropolitanafm);
			Thread.sleep(600);
			executorService.submit(beat98fm);
			Thread.sleep(600);
			executorService.submit(nativafm);
			Thread.sleep(600);
			executorService.submit(sulamericaparadisofm);
			Thread.sleep(600);
			executorService.submit(radiorock89fm);
			Thread.sleep(600);
			executorService.submit(atardefm);
			Thread.sleep(600);
			executorService.submit(litoralfm);
			Thread.sleep(600);
			executorService.submit(disneyfm);
			Thread.sleep(600);
			executorService.submit(alphafm);
			Thread.sleep(600);
			executorService.submit(mundolivrefm);
			Thread.sleep(600);
			executorService.submit(itapemarsfm);
			Thread.sleep(600);
			executorService.submit(atlantidarsfm);
			Thread.sleep(600);
			executorService.submit(lembrancaflashbackfm);
			Thread.sleep(600);
			executorService.submit(alvoradafm);
			Thread.sleep(600);
			executorService.submit(goiania995fm);
			Thread.sleep(600);
			executorService.submit(positivafm);
			Thread.sleep(600);
			executorService.submit(interativafm);
			Thread.sleep(600);
			executorService.submit(liderancafm);
			Thread.sleep(600);
			executorService.submit(cidadefortalezafm);
			Thread.sleep(600);
			executorService.submit(radio100fortalezafm);
			Thread.sleep(600);
			executorService.submit(radiotempofm);
			Thread.sleep(600);
			executorService.submit(radio96fm);
			Thread.sleep(600);
			executorService.submit(antena1bhfm);
			Thread.sleep(600);
			executorService.submit(nativabhfm);
			Thread.sleep(600);
			executorService.submit(antena102fm);
			Thread.sleep(600);
			executorService.submit(lumenfm);
			Thread.sleep(600);
			executorService.submit(maniariofm);
			Thread.sleep(600);
			executorService.submit(maniavoltaredondafm);
			Thread.sleep(600);
			executorService.submit(maniajuizdeforafm);
			Thread.sleep(600);
			executorService.submit(maniauberlandiafm);
			Thread.sleep(600);
			executorService.submit(maniagoianiafm);
			Thread.sleep(600);
			executorService.submit(dimensaofm);
			Thread.sleep(600);
			executorService.submit(radiocidadersfm);
			Thread.sleep(600);
			executorService.submit(continentalfm);
			Thread.sleep(600);
			executorService.submit(itapemascfm);
			Thread.sleep(600);
			executorService.submit(atlantidascfm);
			Thread.sleep(600);
			executorService.submit(energia97fm);
			Thread.sleep(600);
			
		} catch (InterruptedException e) {
			logger.debug(e.getMessage());
		}

		executorService.shutdown();
	}
	
}